
var docPreset = new DocumentPreset();
docPreset.colorMode = DocumentColorSpace.RGB
docPreset.units = RulerUnits.Millimeters
docPreset.width = new UnitValue('21cm').as("px");
docPreset.height = new UnitValue('28cm').as("px");

var doc = documents.addDocument("", docPreset);
doc.artboards[0].name = '21x28cm'; // rename artboard for marking safe area
